home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 52
/
Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso
/
Aminet
/
game
/
think
/
AmiChess.lha
/
AmiChess
/
src
/
inlines.h
< prev
next >
Wrap
C/C++ Source or Header
|
2002-10-13
|
508b
|
26 lines
#ifndef INLINES_H
#define INLINES_H
#ifdef __STORM__
__inline unsigned char leadz(BitBoard b)
#else
static inline unsigned char leadz(BitBoard b)
#endif
{
if(b>>48) return lzArray[b>>48];
if(b>>32) return lzArray[b>>32]+16;
if(b>>16) return lzArray[b>>16]+32;
return lzArray[b]+48;
}
#ifdef __STORM__
__inline unsigned char nbits(BitBoard b)
#else
static inline unsigned char nbits(BitBoard b)
#endif
{
return BitCount[b>>48]+BitCount[(b>>32)&0xffff]+BitCount[(b>>16)&0xffff]+BitCount[b&0xffff];
}
#endif